import java.io.*;
import java.util.*;

class ClientsList<MultiClients>{
	private List clientsList = new ArrayList();
	private int clientNum;
	private ArrayList<String> nameList = new ArrayList<String>();
	public ClientsList() {
		clientNum=0;
	}
	
	public void add(MultiClients mc,String name) {
		clientNum ++;
		nameList.add(name);
		clientsList.add(mc);
	}
	
	public void remove(MultiClients mc,String name) {
		if(clientNum <= 0) return;
		clientNum --;
		clientsList.remove(mc);
		removeName(name);
	}
	
	public void removeName(String name) {
		nameList.remove(name);
	}
	
	public MultiClients get(int i) {
		if(i < 0) return null;
		return (MultiClients)clientsList.get(i);
	}
	public ArrayList getList() {
		return nameList;
	}
	public String getName(int i){
		if(i < 0) return null;
		return nameList.get(i);
	}
	
	public int size() {
		return clientNum;	
	}
	
}